<style>
    .vip_area{
        width: 2.4rem;
        height: 1.3rem;
        position: absolute;
        right: 0;
        margin-top: .6rem;
        z-index: 999;
        
    }

</style>
<!--顶部导航-->
<div class="CenterHeaderBox RollingGoal">
    <div class="CenterBackBtn"><a href="javascript:history.go(-1)"><img src="__CDN__/map/images/return.png" alt="返回"/></a></div>
    <div class="CenterHeaderTitle">个人中心</div>
    <div class="CenterHeaderSetting">
        <a href="{:url('user/set')}"><img src="__CDN__/map/images/setting.png" alt="设置"/></a>
    </div>
</div>

<div class="CenterMain">
    <div class="CenterTop">
        <div class="BgImgAbo">
            {if condition="$user.is_vip eq 1"}
            <img src="__CDN__/map/images/pattern.png" alt="背景图"/>
            {else /}
            <img src="__CDN__/map/images/pattern_bg.png" alt="背景图"/>
            {/if}
        </div>
        <div class="CenterInfo am-cf">
            <div class="CenterTopImg am-fl"><img src="{$user.avatar|cdnurl}" alt="头像"/></div>
            <div class="CenterTopText am-fl">
                <p class="CenterTopTextP1">
                    <span>{$user.nickname}</span>
                    {if condition="$user.is_vip eq 1"}
                    <img src="__CDN__/map/images/Profile.png?c=1" alt=""/>
                    {/if}
                    {if condition="$user.server_type gt 0"}
                    <img src="__CDN__/map/images/ID.png?c=1" alt=""/>
                    {/if}
                    {if condition="$user.is_agent eq 1"}
                    <img src="__CDN__/map/images/Avatar.png?c=1" alt=""/>
                    {/if}
                </p>
                <p class="CenterTopTextP2">
                    {if condition="$shopstatus eq 1"}
                    <span>已开通商家</span>
                    {elseif condition="$shopstatus eq 2"}
                        <span>商家审核失败</span>
                    {elseif condition="$shopstatus eq 0"}
                    <span>商家开通审核中</span>
                    {else}
                    <a href="{:url('user/business')}">
                        <span>立即开通商家</span>
                    </a>
                    {/if}
                    
                </p>
            </div>
            {if $user.is_vip != 1}
            <div class="vip_area" onclick="location.href='{:url('user/join_vip')}'" ></div>
            {/if}
        </div>
    </div>
    <div class="CenterFinance">
        <div class="CenterFinanceTitle">我的账户</div>
        <ul class="am-avg-sm-4">
            <li>
                <a href="{:url('user/balance')}">
                    <p class="number">{$user.money}</p>
                    <p class="text">余额</p>
                </a>
            </li>
            <li>
                <a href="{:url('user/dividend')}">
                    <p class="number">{$user_but}</p>
                    <p class="text">分红</p>
                </a>
            </li>
            <!--<li>-->
                <!--<a href="{:url('user/stock')}">-->
                    <!--<p class="number">{$user_stokc}</p>-->
                    <!--<p class="text">股权</p>-->
                <!--</a>-->
            <!--</li>-->
            <li>
                <a href="{:url('index/user/contribution')}">
                    <p class="number">{$user.score}</p>
                    <p class="text">贡献值</p>
                </a>
            </li>
            <li>
                <a href="{:url('index/user/integral')}">
                    <p class="number">{$user.integral}</p>
                    <p class="text">积分</p>
                </a>
            </li>
        </ul>
        <hr>
    </div>
    <div class="CenterOrder" >
        <div class="CenterOrderTitle am-cf">
            <span class="am-fl">线下订单</span>
            <a class="am-fr" href="{:url('user/orderlist')}?status=4">全部订单</a>
        </div>
        <ul class="am-avg-sm-3">
            <li>
                <a href="{:url('user/order')}?status=1">
                    <p class="img"><img src="__CDN__/map/images/order_status01.png"></p>
                    <p class="text">待付款</p>
                </a>
            </li>
            <li>
                <a href="{:url('user/order')}?status=2">
                    <p class="img"><img src="__CDN__/map/images/order_status02.png"></p>
                    <p class="text">已付款</p>
                </a>
            </li>
            <li>
                <a href="{:url('user/order')}?status=3">
                    <p class="img"><img src="__CDN__/map/images/order_status04.png"></p>
                    <p class="text">待评价</p>
                </a>
            </li>
        </ul>
        <hr>
    </div>
    <div class="CenterEquity">
        <div class="CenterEquityTitle">我的权益</div>
        <ul class="am-avg-sm-4">
            <li>
                <a href="{:url('user/mycode')}">
                    <p class="img"><img src="__CDN__/map/images/To_promote.png"></p>
                    <p class="text">我的推广</p>
                </a>
            </li>
            <li>
                <a href="{:url('user/addagent')}">
                    <p class="img"><img src="__CDN__/map/images/The_agent.png"></p>
                    <p class="text">加入代理</p>
                </a>
            </li>
            <li>
                <a href="{:url('user/collectshop')}">
                    <p class="img"><img src="__CDN__/map/images/collection.png"></p>
                    <p class="text">我的收藏</p>
                </a>
            </li>
            <li>

                {if condition="$shopstatus eq 1"}
                <a href="{:url('user/qrcodet')}">
                    <p class="img"><img src="__CDN__/map/images/merchants.png"></p>
                    <p class="text">商家管理</p>
                </a>
                {elseif condition="$shopstatus eq 0"}
                <a href="{:url('user/business')}">
                    <p class="img"><img src="__CDN__/map/images/merchants.png"></p>
                    <p class="text">开通商家</p>
                </a>
                <!--<p class="img"><img src="__CDN__/map/images/merchants.png"></p>-->
                <!--<p class="text">商家审核中</p>-->
                {elseif condition="$shopstatus eq 2"}
                <a href="{:url('user/business')}">
                <p class="img"><img src="__CDN__/map/images/merchants.png"></p>
                <p class="text">开通商家</p>
                </a>
                {else}
                <a href="{:url('user/business')}">
                    <p class="img"><img src="__CDN__/map/images/merchants.png"></p>
                    <p class="text">开通商家</p>
                </a>
                {/if}

            </li>
        </ul>
    </div>
</div>
<style>
    .CenterOrder,.CenterEquity{margin-top: 0;}
    .CenterFinance,.CenterOrder{padding-bottom: 0;}
    .CenterTopImg{width:1.16rem;height:1.16rem;border-radius: 50%;overflow: hidden;}
    .CenterTopImg img{width:100%;height:100%;}
    .CenterFinance hr,.CenterOrder hr{height: 0.2rem;background:rgba(241,241,241,1);margin-top: 0.5rem;margin-bottom: 0;}
    .CenterHeaderSetting{text-align: right;}
    .number{overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}
</style>

